package com.finalterm.order.dto;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 订单创建DTO
 */
@Data
public class OrderCreateDTO {
    
    @NotNull(message = "商品ID不能为空")
    private Long productId;
    
    @NotNull(message = "购买数量不能为空")
    @Min(value = 1, message = "购买数量必须大于0")
    private Integer quantity;
    
    @NotBlank(message = "收货地址不能为空")
    private String address;
    
    @NotBlank(message = "联系电话不能为空")
    private String phone;
    
    private String remark;
}
